package com.oracle.Until;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateFormatUtil {
    static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    /*字符串转日期*/
    public static Date format(String date) throws Exception {
        return sdf.parse(date);
    }
    /*日期转字符串*/
    public static String dateToString(Date date) {
        return sdf.format(date); }
}
